package com.zfy.cmsservice.mapper;

import com.zfy.cmsservice.entity.Classes;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfy.cmsservice.entity.vo.CascaderClassItemVo;
import com.zfy.cmsservice.entity.vo.ClassesVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 班级表 Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2023-11-11
 */
public interface ClassesMapper extends BaseMapper<Classes> {

    List<ClassesVo> pageClasses(@Param("page") long page, @Param("size") long size, @Param("grade") Integer grade);

    int pageClassesTotal(@Param("page") long page, @Param("size") long size, @Param("grade") Integer grade);

    List<Integer> selectDistinctGrades();

    List<CascaderClassItemVo> selectClassesByGrade(@Param("grade") Integer grade);
}
